<?php

namespace App\Model;

use Illuminate\Database\Eloquent\Model;

/**
 * App\Model\PermissionRole
 *
 * @property integer $permission_id
 * @property integer $role_id
 * @method static \Illuminate\Database\Query\Builder|\App\Model\PermissionRole wherePermissionId($value)
 * @method static \Illuminate\Database\Query\Builder|\App\Model\PermissionRole whereRoleId($value)
 * @mixin \Eloquent
 * @property-read \App\Model\Permission $permission
 */
class PermissionRole extends Model
{
    protected $table = 'permission_role';

    protected $guarded = [];

    public $timestamps = false;

    public function permission()
    {
        return $this->hasOne('App\Model\Permission', 'id', 'permission_id');
    }

    public function role()
    {
        return $this->hasOne('App\Model\Role', 'id', 'role_id');
    }
}
